package cn.htsyb.synergy.swagger.configuration;

import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * @author lakeside hubin_yuan.410@hotmail.com
 * @version V1.0.0
 * @date 2022/5/28
 * @since 1.0
 */
@Configuration
@EnableOpenApi
public class SwaggerConfiguration {
    public static ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .title("Synergy Api Center")
                .version("0.0.1")
                .build();
    }
    public static Docket baseDocket() {
        return new Docket(DocumentationType.OAS_30)
                .apiInfo(apiInfo())
                .useDefaultResponseMessages(false)
                .forCodeGeneration(false)
                ;
    }
}
